]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
tests/fittsy: Await leisure before checking fittsiness
authorJonas Ådahl <jadahl@gmail.com>
Fri, 28 Jun 2024 21:01:12 +0000 (23:01 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 28 Jun 2024 21:52:19 +0000 (21:52 +0000)
Not until we've waited for leisure can we make precise assumptions about
otherwise animated actors sizes and positions, so do that before
checking fittsiness.

This should fix the flakyness of the fittsy test case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3398>

tests/shell/fittsy.js

index 53f58e0e479f17fa3b70752d26edb347f0aeef00..09838d1263a4d7de892733b5e42798b2560f1b4f 100644 (file)
@@ -4,6 +4,7 @@ import Clutter from 'gi://Clutter';
 import Shell from 'gi://Shell';
 
 import * as Main from 'resource:///org/gnome/shell/ui/main.js';
+import * as Scripting from 'resource:///org/gnome/shell/ui/scripting.js';
 import {sleep} from 'resource:///org/gnome/shell/ui/scripting.js';
 
 const {Orientation, PickMode, TextDirection} = Clutter;
@@ -45,6 +46,8 @@ export async function run() {
     const leftEdge = primaryMonitor.x + EPSILON;
     const rightEdge = primaryMonitor.x + primaryMonitor.width - EPSILON;
 
+    await Scripting.waitLeisure();
+
     const showApps = Main.overview.dash.showAppsButton;
     console.debug('Checking that dash extends to bottom screen edge');
     checkFittsiness('fittsyDash',